<!--
 * @Author: IBOSS 2776641037@qq.com
 * @Date: 2025-07-10 10:57:35
 * @LastEditors: IBOSS 2776641037@qq.com
 * @LastEditTime: 2025-07-15 12:04:28
 * @FilePath: \mini-program---shopping\src\pages\index\components\CategoryPanel.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script setup lang="ts">
import type { CategoryItem } from '@/types/home'

// 定义 props 接收数据
defineProps<{
  list: CategoryItem[]
}>()
</script>

<template>
  <view class="category">
    <navigator class="category-item" hover-class="none" :url="item.url" v-for="item in list" :key="item.id">
      <image class="icon" :src="item.icon"></image>
      <text class="text">{{ item.name }}</text>
    </navigator>
  </view>
</template>

<style lang="scss">
@use '../styles/category.scss';
</style>
